<%@page import="com.tjsinfo.tjsoa.workReport.vo.TResourceWorkReport"%>
<%@page import="com.tjsinfo.tjsoa.common.PaginationSupport"%>
<%@page import="com.tjsinfo.tjsoa.common.DealString"%>
<%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>
<app:validateSession/>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	DealString ds=new DealString();
	PaginationSupport paginationSupport=(PaginationSupport)request.getAttribute("paginationSupport");
	List<TResourceWorkReport> list=paginationSupport.getItems();
	String pageNoStr = request.getParameter("pageNo");
	if (pageNoStr == null) pageNoStr = "0";
	Integer pageNo = Integer.valueOf(pageNoStr);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>天津市粮油集团有限公司 OA办公自动化协作平台</title>
<link href="<%=basePath %>style/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function submitpages(value){
	if(value==-1){
		alert("请重新选择页码!");
		return ;
	}
	var urls=location.href;
	if(urls.indexOf('pageNo=')==-1){
		if(urls.indexOf('?')==-1){//wucan
			window.location.href=urls+'?pageNo='+value;
		}else{
			window.location.href=urls+'&pageNo='+value;
		}
	}else{
		urls=urls.substring(0,urls.indexOf('pageNo=')+7)+value;
		window.location.href=urls;
	}
}
</script>
</head>

<body>
<div id="basic" style="width: 99%;">
    <!--导航开始处-->
    <div id="index_title" >
	    <ul>
		    <li id="ul_title1" class="over"><a onclick="change(0)" style="cursor:hand"><span>述职报告查看</span></a></li>
		</ul>
	</div>
    <!--这里开始是显示、隐藏的内容-->
    <div id="draft_list" class="draft_list">
		<ul>
			<%
            String title="";
            int i=0;
            for(TResourceWorkReport workReport:list){
            	i++;
            	if(i%7==0)out.print("</ul><ul>");
				title=workReport.getTitle();
				if(title.length()>56)title=ds.substring(title,56);
			%>
			<li><a href="<%=basePath %>tjsinfo/tjsoa/workreport/workReportView.do?id=<%=workReport.getId() %>" target="_black"><%=title %></a><span><a onclick="delInfo()" style="cursor:hand"><font color="blue">&nbsp;</font></a></span></li>
			<%} %>
		</ul>
		<div style="padding-top: 15px;text-align: center;">
			共<%=paginationSupport.getTotalCount()%>条,共<%=paginationSupport.getPageCount()%>页&nbsp;&nbsp;
			当前为第<%=pageNo + 1%>页&nbsp;&nbsp;

			<% if (paginationSupport.getStartIndex() > 1) { %>
				<a onclick="submitpages('<%=pageNo - 1%>')" style="cursor: hand">上一页</a>
			
			<% } %>
			<% if (paginationSupport.getStartIndex()
						+ paginationSupport.getPageSize() < paginationSupport
						.getTotalCount()) {
			%>
				<a onclick="submitpages('<%=pageNo + 1%>')" style="cursor: hand">下一页</a>
			<% } %>
			&nbsp;&nbsp; 跳转到
			<select name="selectPage" id="selectPage"
				onchange="submitpages(this.value)">
				<option value="0">
					--跳转--
				</option>
				<%
					for (int pi = 0; pi < paginationSupport.getPageCount(); pi++) {
				%>
				<option value="<%=pi%>"><%=pi + 1%></option>
				<%
					}
				%>
			</select>
			页
		</div>
	</div>
</div>
</body>
</html>

